// FolderPermissionLabel.h
#ifndef FOLDERPERMISSIONLABEL_H
#define FOLDERPERMISSIONLABEL_H

#include <QWidget>
#include <QHBoxLayout>
#include <QLabel>
#include "basic/statelabel.h"

class FolderPermissionLabel : public QWidget
{
    Q_OBJECT
public:
    enum PermissionState { Allow, Deny, NotSet };
    Q_ENUM(PermissionState)

    explicit FolderPermissionLabel(QWidget *parent = nullptr);

    // 设置权限
//    void setReadPermission(PermissionState state);
//    void setWritePermission(PermissionState state);


signals:
    void permissionChanged(bool isRead, FolderPermissionLabel::PermissionState newState);

private:
    void setupStateLabels();
    static QVector<StateData> createStateIcons();

    StateLabel *m_readLabel;
    StateLabel *m_writeLabel;
    QHBoxLayout *m_layout;
};

#endif // FOLDERPERMISSIONLABEL_H
